<!--
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2023-11-29 09:51:05
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2023-11-30 17:26:35
 * @FilePath: /tuberculosis_screening_app/src/modules/center/src/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <Header></Header>
    <!-- <div class="align-items_center">
      <div class="flex align-items_center">
        <van-image
          round
          width="4rem"
          height="4rem"
          src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
        />

        <div>
          <div>Wanglizhi</div>
          <div>15900001111</div>
        </div>
      </div>

      <div>
        <van-button round type="success" size="small">圆形按钮</van-button>
      </div>
    </div>

    <div class="grid column_4">
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
      <div class="grid-item">
        <div>image</div>
        <div>采集</div>
      </div>
    </div> -->

    <van-cell-group inset>
      <van-cell icon="location-o" title="单元格" is-link value="111" />
      <van-cell icon="location-o" title="单元格" is-link />
      <van-cell icon="location-o" title="单元格" is-link />
    </van-cell-group>

    <van-button block>块级元素</van-button>


    <div>{{JSON.stringify(user)}}</div>
    <div>{{count}}</div>
    <van-button @click="increment">increment</van-button>
    <van-button @click="decrement">decrement</van-button>
  </div>
</template>

<script>
import { defineComponent, computed } from "vue";
import { getUser } from "../api/index.service";
import userCenterStore from '../store/index';
import Header from '../components/header.vue';

export default defineComponent({
  name: "Center",
  components: {
    Header,
  },
  setup() {
    const user = getUser();
    const centerStore = userCenterStore();
    
    console.log('user', user, centerStore)
    const count = computed(() => centerStore.count)
    function increment() {
      centerStore.increment()
    };
    function decrement() {  
      centerStore.decrement()
    }
    return {
      user,
      count,
      increment,
      decrement
    };
  },
});
</script>

<style>
</style>
